package vip.sweet.biz.modular.user.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.user.entity.BizUser;
import vip.sweet.biz.modular.user.mapper.BizUserMapper;
import vip.sweet.biz.modular.user.params.BizUserAddParams;
import vip.sweet.biz.modular.user.service.BizUserService;
import vip.sweet.common.utils.JwtUtil;
import vip.sweet.common.utils.MD5Util;

/**
 * @author ASUS
 * @Date 2025/10/4 12:23
 * @Descripition
 */
@Service
public class BizUserServiceImpl extends ServiceImpl<BizUserMapper, BizUser> implements BizUserService {
    @Override
    public boolean register(BizUserAddParams bizUserAddParams) {
        BizUser bizUser= BeanUtil.toBean(bizUserAddParams,BizUser.class);
        bizUser.setPassword(MD5Util.getMD5String(bizUserAddParams.getPassword()));
        return this.save(bizUser);
    }
}
